#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.client.ui;

import java.util.List;

import com.google.gwt.user.client.ui.VerticalPanel;
import ${package}.client.beans.Mail;
import ${package}.client.beans.YahooModel;
import ${package}.client.rpc.YahooRemoteServiceAsync;

public class TwitterHomePanel extends VerticalPanel{

	private UpdatePanel mTwitterUpdatePanel;
	private TwitterTweetPanel mTwitterTweetPanel;
	private YahooModel mTwitterModel;
	
	public TwitterHomePanel(YahooModel pTwitterModel,YahooRemoteServiceAsync pService){
		mTwitterModel = pTwitterModel;
		mTwitterUpdatePanel = new UpdatePanel(pService);
		mTwitterTweetPanel = new TwitterTweetPanel();
		setWidth("100%");
		getElement().scrollIntoView();
	}
	
	public void initTwitterHomePanel(){
		
		add(mTwitterUpdatePanel);
		mTwitterTweetPanel.initTwitterTweetPanel();
		
		List<Mail> tweets = mTwitterModel.getMailList();
		mTwitterTweetPanel.addTweet(tweets);
		
		add(mTwitterTweetPanel);
	}

	public UpdatePanel getTwitterUpdatePanel() {
		return mTwitterUpdatePanel;
	}

	public void setTwitterUpdatePanel(UpdatePanel pTwitterUpdatePanel) {
		mTwitterUpdatePanel = pTwitterUpdatePanel;
	}

	public TwitterTweetPanel getTwitterTweetPanel() {
		return mTwitterTweetPanel;
	}

	public void setTwitterTweetPanel(TwitterTweetPanel pTwitterTweetPanel) {
		mTwitterTweetPanel = pTwitterTweetPanel;
	}
	
	
}
